package com.jerei.plugin.service.impl;

import com.jerei.plugin.dao.IWcmCommonResourceDao;
import com.jerei.plugin.entity.WcmCommonResource;
import com.jerei.plugin.service.IWcmCommonResourceService;
import com.jerei.utils.condition.ConditionEntity;
import com.jerei.utils.spring.PageBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by sunfeihu on 2016/10/21.
 */
@Service
public class WcmCommonResourceServiceImpl implements IWcmCommonResourceService {

    @Autowired
    private IWcmCommonResourceDao iWcmCommonResourceDao;

    @Override
    public WcmCommonResource save(WcmCommonResource entity) {
        return iWcmCommonResourceDao.save(entity);
    }

    @Override
    public int delete(Long id) {
        return iWcmCommonResourceDao.delete(id);
    }

    @Override
    public int update(WcmCommonResource entity) {
        return iWcmCommonResourceDao.update(entity);
    }

    @Override
    public WcmCommonResource find(Long id) {
        return iWcmCommonResourceDao.find(id);
    }


    @Override
    public void save(List<WcmCommonResource> list) {
        iWcmCommonResourceDao.save(list);
    }

    @Override
    public void delete(List<Long> ids) {
        iWcmCommonResourceDao.delete(ids);
    }

    @Override
    public void update(List<WcmCommonResource> list) {
        iWcmCommonResourceDao.update(list);
    }

    @Override
    public PageBean<WcmCommonResource> page(int nowPage, int pageSize, ConditionEntity conditionEntity) {
        return iWcmCommonResourceDao.page(nowPage, pageSize, conditionEntity);
    }

    @Override
    public PageBean<WcmCommonResource> pageByNull(int nowPage, int pageSize) {
        return null;
    }
}
